<?php
namespace Home\Controller;
use Think\Controller;
class CommonController extends Controller{
    
    public function __construct(){
        header("content-type:text/html;charset=utf-8");
        parent::__construct();
    }
    
    public function getRank(){
     $conds['status']=1; //当状态有效时的10条数据  
     $news=D("News")->getRank($conds,10);   
     return $news;   
    }
    //错误404定义
    public function error($message=""){
       $message=$message ? $message :"系统错误";
       $this->assign("message",$message);
       $this->display(); 
    }
    
    
}

